@media screen {

    html, body {
        min-height: 100%;
    }

    body {
        margin: 0;
        font-size: 18px;
        font-family: 'PT Sans', Verdana, sans-serif;
        background: #ffffff;
        line-height: 1.4;
        overflow-y: scroll;
    }

    /*** layout ***/

    .wrapper {
        max-width: 1440px;
        margin: 0 auto;
    }

    #page-wrap {
        position: relative;
        overflow: hidden;
        width: 100%;
        min-height: 100vh;
    }

    /*** loader ***/

    #loader {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: white;
        transition: opacity 1s ease-in-out;
        display: flex;
        justify-content: center;
        align-items: center;

        z-index: 11;
    }

    .site-loaded #loader {
        opacity: 0;
    }

    #loader-inner {
        font-size: 3em;
    }

    /*** canvas ***/

    #canvas {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;

        z-index: 10;

        transition: opacity 0.75s ease-in-out;
    }

    #back-to-lib-link {
        display: inline-block;
        position: fixed;
        top: 0;
        right: 0;
        padding: 0.25em 0.5em;
        background: #ee6557;
        color: white;
        text-decoration: none;
        z-index: 20;
        font-size: 0.85em;
    }

    #back-to-lib-link:hover {
        background: black;
    }

    #source-code-link {
        display: inline-block;
        position: fixed;
        bottom: 1em;
        right: 1em;
        padding: 0.25em 0.5em;
        background: #ee6557;
        color: white;
        text-decoration: none;
        z-index: 20;
    }

    #source-code-link:hover {
        background: black;
    }

    .page-transition #canvas {
        opacity: 0;
    }

    /*** navigation ***/

    #navigation {
        display: flex;
        justify-content: center;
        margin-bottom: 40px;
        position: relative;
        z-index: 15;
    }

    #navigation a {
        margin: 0.5em 1em;
        padding: 0.25em 0.5em;
        background: #aaa;
        color: white;
        text-decoration: none;
        text-transform: uppercase;
    }

    #navigation a:hover {
        background: #333;
    }

    #navigation a.active {
        background: #ee6557;
    }

    /*** content ***/

    #content {
        position: relative;
        z-index: 10;

        transition: opacity 0.75s ease-in-out;
    }

    .page-transition #content {
        opacity: 0;
    }


    /*** archive ***/

    #archive {
        margin: 0 -20px;
        display: flex;
        flex-wrap: wrap;
    }

    .archive-item {
        padding: 0 20px;
        position: relative;
        flex-basis: 50%;
        margin-bottom: 40px;
        box-sizing: border-box;
    }

    .plane-wrapper {
        position: relative;
        overflow: hidden;
        height: 0;
        padding-bottom: 66.6%;
    }

    .plane {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
    }

    .plane img {
        display: none;
    }

    /*** handling errors ***/

    .no-curtains .plane img, .no-plane.plane img {
        display: block;
        width: 100%;
        height: auto;
    }

}




@media screen and (max-width: 1480px) {

    body {
        font-size: 17px;
    }

    .wrapper {
        margin: 0 20px;
    }

}

@media screen and (max-width: 1280px) {

    body {
        font-size: 16px;
    }

}


@media screen and (max-width: 980px) {

    body {
        font-size: 15px;
    }

    .wrapper {
        margin: 0 10px;
    }

    #archive {
        margin: 0 -10px;
    }

    .archive-item {
        padding: 0 10px;
        margin-bottom: 20px;
    }

}


@media screen and (max-width: 640px) {

    .archive-item {
        flex-basis: 100%;
    }

}
